﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Web.Profile;



namespace WebSite.admin.member
{
    public partial class users_address : BaseAdmin
    {

        // Methods
        private void Bind()
        {
            string sql = "select * from DB_Memberadd where memberid=" + base.Request.QueryString["mid"].ToString() + "";
            this.GridView1.DataSource = SQLAccess.GreatDs(sql);
            this.GridView1.DataBind();
        }

        protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if ((e.Row.RowType == DataControlRowType.Header) || (e.Row.RowType == DataControlRowType.DataRow))
            {
                if (e.Row.RowType == DataControlRowType.DataRow)
                {
                    e.Row.Cells[1].Width = 180;
                    e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=\"" + e.Row.Style["BACKGROUND-COLOR"] + "\"");
                    e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor=\"#efefef\"");
                }
                else
                {
                    DataControlRowType rowType = e.Row.RowType;
                }
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["Adminlogin"] == null)
            {
                base.Response.Write("<script language=javascript>window.top.location.href='../login.aspx';</script>");
                base.Response.End();
            }
            if (!base.IsPostBack && (base.Request.QueryString["mid"] != null))
            {
                this.Bind();
            }
        }

    }
}